// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	8/5/2013 8:57:35 PM				
// -----------------------------

#include "Image.h"
#include <iostream>

Image::Image(const char* Name)
	: Object(Name)
	, m_Width(0)
	, m_Height(0)
{
	std::cout << "Creating Image\n";
}

Image::Image(const char* Name, int width, int height)
	: Object(Name)
	, m_Width(width)
	, m_Height(height)
{
	std::cout << "Creating Image (" << width << "," << height << ")\n";
}

Image::Image(const Image& refImage)
	: Object(refImage.getName())
	, m_Width(refImage.m_Width)
	, m_Height(refImage.m_Height)
{
}

Image& Image::operator=(const Image& refImage)
{
	return (*this);
}

Image::~Image()
{
}

void Image::setWidth(int width)
{
	m_Width = width;
}
void Image::setHeight(int height)
{
	m_Height = height;
}

int Image::getWidth() const
{
	return m_Width;
}
int Image::getHeight() const
{
	return m_Height;
}

Image Image::operator-() const
{
	return Image(getName(), -m_Width, -m_Height);
}
Image Image::operator+(const Image& refImage) const
{
	return Image(getName(), m_Width + refImage.m_Width, m_Height + refImage.m_Height);
}
Image Image::operator-(const Image& refImage) const
{
	return Image(getName(), m_Width - refImage.m_Width, m_Height - refImage.m_Height);
}
Image Image::operator*(float scale) const
{
	return Image(getName(), (int) (m_Width * scale), (int) (m_Height * scale));
}
Image Image::operator/(float scale) const
{
	return Image(getName(), (int) (m_Width / scale), (int) (m_Height / scale));
}